public struct CharacterActionData
{
    public int chooseCharacterType;//选择单位类型，0是友方，1是敌人
    public int chooseCharacterOrder;//选择的单位是第几个，-1是随机，从0开始
    public int actionRange;//作用范围，-1是分裂，0是全部，1是单体，2是前两名
    public int actionType;//作用类型，0是格挡，1是加伤害+-，2是加胆魄+-
    public int actionNum;//作用的数值
    public int actionCount;//作用的次数
    public int actionTime;//作用的回合数
    public bool isAimSelf;//是否对敌人自己用
    public int roundInfluenceNum;//回合数对敌人行动数值的影响系数

    public void ReadFromAttackEveryRound(AttackEveryRound attackEvent)
    {
        this.chooseCharacterType = attackEvent.chooseCharacterType;
        this.chooseCharacterOrder = attackEvent.chooseCharacterOrder;
        this.actionRange = attackEvent.actionRange;
        this.actionType = attackEvent.actionType;
        this.actionNum = attackEvent.actionNum;
        this.actionCount = attackEvent.actionCount;
        this.actionTime = attackEvent.actionTime;
        this.isAimSelf = attackEvent.isAimSelf;
        this.roundInfluenceNum = attackEvent.roundInfluenceNum;
    }

    public CharacterActionData(int chooseCharacterType, int chooseCharacterOrder, int actionRange, int actionType, int actionNum,int actionCount, int actionTime,bool isAimSelf,int roundInfluenceNum)//极其特殊的（不常用的）效果用这个
    {
        this.chooseCharacterType = chooseCharacterType;
        this.chooseCharacterOrder = chooseCharacterOrder;
        this.actionRange = actionRange;
        this.actionType = actionType;
        this.actionNum = actionNum;
        this.actionCount = actionCount;
        this.actionTime = actionTime;
        this.isAimSelf = isAimSelf;
        this.roundInfluenceNum = roundInfluenceNum;
    }

    //下面都是些常用的效果函数

    public void SingleAttackEnemy(int chooseCharacterOrder,int actionNum,int actionCount,int actionTime)
    {
        this.chooseCharacterType = 1;
        this.chooseCharacterOrder = chooseCharacterOrder;
        this.actionRange = 1;
        this.actionType = 1;
        this.actionNum = actionNum;
        this.actionCount = actionCount;
        this.actionTime = actionTime;
    }

    public void AllAttackEnemy(int actionNum, int actionCount, int actionTime)
    {
        this.chooseCharacterType = 1;
        this.chooseCharacterOrder = 0;
        this.actionRange = 0;
        this.actionType = 1;
        this.actionNum = actionNum;
        this.actionCount = actionCount;
        this.actionTime = actionTime;
    }

    public void DoubleAttackEnemy(int chooseCharacterOrder,int actionNum, int actionCount, int actionTime)
    {
        this.chooseCharacterType = 1;
        this.chooseCharacterOrder = chooseCharacterOrder;
        this.actionRange = 2;
        this.actionType = 1;
        this.actionNum = actionNum;
        this.actionCount = actionCount;
        this.actionTime = actionTime;
    }

    public void SingleDefenceFriend(int chooseCharacterOrder,int actionNum, int actionCount, int actionTime)
    {
        this.chooseCharacterType = 0;
        this.chooseCharacterOrder = chooseCharacterOrder;
        this.actionRange = 1;
        this.actionType = 0;
        this.actionNum = actionNum;
        this.actionCount = actionCount;
        this.actionTime = actionTime;
    }
    public void AllDefenceFriend(int actionNum, int actionCount, int actionTime)
    {
        this.chooseCharacterType = 0;
        this.chooseCharacterOrder = 0;
        this.actionRange = 0;
        this.actionType = 0;
        this.actionNum = actionNum;
        this.actionCount = actionCount;
        this.actionTime = actionTime;
    }

    public void SingleCourgeFriend(int chooseCharacterOrder, int actionNum, int actionCount, int actionTime)
    {
        this.chooseCharacterType = 0;
        this.chooseCharacterOrder = chooseCharacterOrder;
        this.actionRange = 1;
        this.actionType = 2;
        this.actionNum = actionNum;
        this.actionCount = actionCount;
        this.actionTime = actionTime;
    }

    public void AllCourgeFriend(int actionNum, int actionCount, int actionTime)
    {
        this.chooseCharacterType = 0;
        this.chooseCharacterOrder = 0;
        this.actionRange = 1;
        this.actionType = 2;
        this.actionNum = actionNum;
        this.actionCount = actionCount;
        this.actionTime = actionTime;
    }
}
